package com.tanhua.dubbo.server.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

/**
 * @author Tenebrous
 * mongobd对应字段
 * @Document 对应这数据表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "recommend_user")
public class RecommendUser implements java.io.Serializable {

    private static final long serialVersionUID = -4619358232302187633L;

    /**
     * 主键id
     */
    @Id
    private ObjectId id;

    /**
     * 推荐的用户id
     * @Indexed 索引
     */
    @Indexed
    private Long userId;

    /**
     * 用户id
     */
    private Long toUserId;

    /**
     * 推荐得分
     */
    @Indexed
    private Double score;

    /**
     * 日期
     */
    private String date;

}
